package dao

// 这是 SmsHomeRecommendSubject 的全局公开dao对象，被service层调用!
var SmsHomeRecommendSubjectDao = smsHomeRecommendSubjectDao{}

// 这是 sms_home_recommend_subject表 的实体类
type SmsHomeRecommendSubject struct {
	Id              int64  `json:"id" form:"id"` // 编号
	SubjectId       int64  `json:"subject_id" form:"subject_id"`
	SubjectName     string `json:"subject_name" form:"subject_name"`
	RecommendStatus int32  `json:"recommend_status" form:"recommend_status"`
	Sort            int32  `json:"sort" form:"sort"`
}

// 注意:这是 SmsHomeRecommendSubject 的私有dao对象，只能在dao层内使用!
type smsHomeRecommendSubjectDao struct {
	InsertTemplate        func(arg []SmsHomeRecommendSubject) (int64, error)
	UpdateSort            func(id, sort int) (int64, error)                   `args:"id,sort"`
	UpdateRecommendStatus func(ids []int, recommendStatus int) (int64, error) `args:"ids,recommend_status"`
	Delete                func(ids []int) (int64, error)                      `args:"ids"`
	List                  func(arg SmsHomeRecommendSubjectList) ([]SmsHomeRecommendSubject, error)
}

type SmsHomeRecommendSubjectReq struct {
	List []SmsHomeRecommendSubject `json:"list"`
}

type SmsHomeRecommendSubjectList struct {
	SubjectName     string `json:"subject_name" form:"subject_name"`
	RecommendStatus int32  `json:"recommend_status" form:"recommend_status"`
	Page
}
